-- GENERATED SPELL FOR [Whirling Invader] --


function spell0_14455(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15576,pUnit)
pUnit:RegisterEvent('Sorts_14455', 612, 1)
end

function spell1_14455(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(17207,pUnit)
pUnit:RegisterEvent('Sorts_14455', 2000, 1)
end

function Sorts_14455(pUnit, Event)
local choix_sorts_14455 = math.random(0, 1)
if choix_sorts_14455 == 0 then
pUnit:RegisterEvent('spell0_14455', 1, 1)
end
if choix_sorts_14455 == 1 then
pUnit:RegisterEvent('spell1_14455', 1, 1)
end
end

function mob14455_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_14455', math.random(1500, 3000), 1)
end

function mob14455_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14455_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14455_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(14455, 1, 'mob14455_Action')
RegisterUnitEvent(14455, 2, 'mob14455_Leave')
RegisterUnitEvent(14455, 3, 'mob14455_Kill')
RegisterUnitEvent(14455, 4, 'mob14455_Die')
